<!DOCTYPE html >
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>商品列表</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link rel="shortcut icon" href="favicon.ico">
    <link rel="stylesheet" th:href="@{/resource/css/bootstrap.min.css}" />
    <link rel="stylesheet" th:href="@{/resource/css/font-awesome.min.css}" />
    <link rel="stylesheet" th:href="@{/resource/css/animate.css}" />
    <link rel="stylesheet" th:href="@{/resource/css/style.css}" />
    <link th:href="@{/resource/css/plugins/sweetalert/sweetalert.css}" rel="stylesheet">
    <link th:href="@{/resource/css/plugins/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet">
    <link rel="stylesheet" th:href="@{/resource/css/plugins/toastr/toastr.min.css}" />
    <style>
        .table th, .table td {
            text-align: center;
            vertical-align: middle!important;
        }
    </style>
</head>

<body class="gray-bg">

<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <div class="row">
                        <div class="col-sm-10">  <h5>商品管理 &nbsp;/&nbsp;  <small>选品库列表</small></h5></div>
                        <div class="col-sm-2">
                            <button type="button" class="btn btn-sm btn-primary btn-sm" id="sycnFavorites">同步选品库</button>
                            <button type="button" class="btn btn-sm btn-primary btn-sm" id="clear_pro">清理3天前的商品</button>
                        </div>
                    </div>
                </div>
                <div class="ibox-content">
                    <input type="text"  id="menu_code" style="display: none" />
                    <div class="alert alert-success" style="display: none" id="favoriteTableEventsResult" role="alert">

                    </div>
                    <!-- Example Events -->
                    <div class="example-wrap">
                        <table id="favoriteTableEvents" data-height="400" data-mobile-responsive="true" class="table table-hover">

                    </div>
                </div>
                <!-- End Example Events -->

            </div>
        </div>
    </div>
</div>
</div>


<div th:include="footer"></div>
<script type="text/javascript" th:src="@{/script/js/biz/product/favorite.js}"></script>
<script>

    function sycnProduct(id,name) {
        $.ajax({
            url: "getProductByCidForList",
            data: id,
            type: "post",
            contentType: "application/json",
            dataType:"json",
            success: function (data) {
                if(data["retType"] == "0") {
                    toastr.success("同步成功!");
                } else {
                    alert(data["retMsg"]);
                }
            }
        });
    }




</script>
</body>
</html>